package com.guojian.common.poi;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.List;

import cn.hutool.core.util.ObjectUtil;
import cn.hutool.poi.excel.ExcelUtil;
import cn.hutool.poi.excel.sax.handler.RowHandler;

public class Test {

	public static void main(String[] args) {
		try {
			ExcelUtil.readBySax(new FileInputStream(new File("F:/新建 XLSX 工作表.xlsx")), "0", new RowHandler() {
				@Override
				public void handle(int sheetIndex, long rowIndex, List<Object> rowList) {
					for (Object cell : rowList) {
						System.out.print(ObjectUtil.toString(cell) + "==");
					}
					System.out.println();
				}
			});
		} catch (FileNotFoundException e) {
			e.printStackTrace();
		}

	}

}
